using System;
using System.Collections.Generic;
using RSteel.DAL;
using RSteel.DAO;
using RSteel.Utils;

public partial class NewsBlock : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        List<News> news = NewsDao.Instance.GetObjects(3);

        foreach (News newsObj in news)
        {
            newsObj.Caption = Utils.WrapString(newsObj.Caption, 50);
        }

        newsRepeater.DataSource = news;
        newsRepeater.DataBind();
    }
}
